package com.soup.fs;

import com.soup.fs.impl.CustomFileSystem;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class FileSystemtest {
    public static void main(String[] args) throws Exception{
        FileSystem fileSystem = CustomFileSystem.getCustomFileSystem();


//        File file = new File("D:\\2.mp4");
//
//        FileInputStream fileInputStream = new FileInputStream(file);
//
//        String upload = fileSystem.upload(fileInputStream, file.getName());
//        System.out.println(upload);

        //726517612738999926

        byte[] download = fileSystem.download("726517612738999926");
        FileOutputStream fileOutputStream = new FileOutputStream("d:/drc.mp4");
        fileOutputStream.write(download);
        fileOutputStream.close();
    }
}
